<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class FrontEnd_Lib {
    private $ci;
    public $aCss = array();
    public $aJs = array();

    public function __construct($param)
    {
        $this->ci = $param['_ci'];
    }

    public function setACss($aCss)
    {
        if(is_array($aCss)){
            if (count($this->aCss) == 0) {
                $this->aCss = $aCss;
            } else {
                $this->aCss = array_merge($this->aCss, $aCss);
            }
        } else {
            $this->aCss[] = $aCss;
        }
    }

    public function setAJs($aJs)
    {
        if(is_array($aJs)){
            if (count($this->aJs) == 0) {
                $this->aJs = $aJs;
            } else {
                $this->aJs = array_merge($this->aJs, $aJs);
            }
        } else {
            $this->aJs[] = $aJs;
        }
    }

    public function renderModule($func, $limit, $is_module, $aData=array()){
        $this->ci->$func($limit, true, $aData);
    }
}
?>